home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 516 / librarys / sys_vars.s < prev    next >
Text File  |  1991-09-22  |  9KB  |  204 lines

  1. ; ATARI.S       Equate and macro file for atari ST      RMS
  2. ;               Extended and Improved: 8/11/88 - RJZ
  3. ;               Combined and Extended and Improved: 09/16/88 - RMS
  4. ;
  5.  
  6. save_rs:        EQU ^^RSCOUNT   ;RS-Counter merken
  7.  
  8. ; File header structure
  9.                 RSRESET
  10. FILE_ID:        RS.W 1
  11. TSIZE:          RS.L 1
  12. DSIZE:          RS.L 1
  13. BSIZE:          RS.L 1
  14. SSIZE:          RS.L 1
  15. XXX1:           RS.L 1
  16. XXX2:           RS.L 1
  17. XXX3:           RS.W 1
  18. HEADSIZE:       EQU ^^RSCOUNT
  19.  
  20. ; base page structure
  21.                 RSRESET
  22. LOWTPA:         RS.L 1
  23. HITPA:          RS.L 1
  24. TBASE:          RS.L 1
  25. TLEN:           RS.L 1
  26. DBASE:          RS.L 1
  27. DLEN:           RS.L 1
  28. BBASE:          RS.L 1
  29. BLEN:           RS.L 1
  30. DTA:            RS.L 1
  31. PARENT:         RS.L 1
  32. XXXX:           RS.L 1
  33. ENVIR:          RS.L 21
  34. CMDLINE:        RS.B 128
  35.  
  36. ; defines
  37. TEXTSZ:         EQU TLEN
  38. DATASZ:         EQU DLEN
  39. BSSSZ:          EQU BLEN
  40. BPSZ:           EQU ^^RSCOUNT
  41. MYDTA:          EQU DTA
  42.                 RSSET save_rs   ;RS-Counter wieder zurücksetzen
  43.  
  44. CR:             EQU $0D
  45. LF:             EQU $0A
  46. TAB:            EQU $09
  47.  
  48. ****
  49. ****  This is a preliminary equates file for the Atari ST;
  50. ****  not all the equates may be here, there may be typos
  51. ****  we haven't caught, and not all the macros for Gemdos
  52. ****  and the BIOS have been defined.
  53. ****
  54.  
  55. ;
  56. ; Atari ST hardware locations
  57. ;
  58. memconf:        EQU $FFFF8001   ;memory configuration
  59. vbasehi:        EQU $FFFF8201
  60. vbasemid:       EQU $FFFF8203   ;Video base address
  61. vcounthi:       EQU $FFFF8205
  62. vcountmid:      EQU $FFFF8207
  63. vcountlo:       EQU $FFFF8209   ;Video display counter
  64. syncmode:       EQU $FFFF820A   ;video sync mode
  65. vbaselo:        EQU $FFFF820D   ;Video base address (lo; STE only)
  66. linewid:        EQU $FFFF820F   ;Width of a scan-line (Words, minus 1; STE only)
  67. palette:        EQU $FFFF8240   ;color registers 0..15
  68. rezmode:        EQU $FFFF8260   ;Resolution mode (0=320x200,1=640x200,2=640x400)
  69. hscroll:        EQU $FFFF8265   ;Horizontal scroll count (0..15; STE only)
  70.  
  71. diskctl:        EQU $FFFF8604   ;disk controller data access
  72. fifo:           EQU $FFFF8606   ;DMA mode control
  73. dmahi:          EQU $FFFF8609
  74. dmamid:         EQU $FFFF860B
  75. dmalo:          EQU $FFFF860D   ;DMA base address
  76.  
  77. cmdreg:         EQU $80         ;1770/FIFO command register select
  78. trkreg:         EQU $82         ;1770/FIFO track register select
  79. secreg:         EQU $84         ;1770/FIFO sector register select
  80. datareg:        EQU $86         ;1770/FIFO data register select
  81.  
  82. ; GI ("psg") sound chip:
  83. giselect:       EQU $FFFF8800   ;(W) sound chip register select
  84. giread:         EQU $FFFF8800   ;(R) sound chip read-data
  85. giwrite:        EQU $FFFF8802   ;(W) sound chip write-data
  86. gitoneaf:       EQU 0           ;channel A fine/coarse tune
  87. gitoneac:       EQU 1
  88. gitonebf:       EQU 2           ;channel B
  89. gitonebc:       EQU 3
  90. gitonecf:       EQU 4           ;channel C
  91. gitonecc:       EQU 5
  92. ginoise:        EQU 6           ;noise generator control
  93. gimixer:        EQU 7           ;I/O control/volume control register
  94. giaamp:         EQU 8           ;channel A, B, C amplitude
  95. gibamp:         EQU 9
  96. gicamp:         EQU $0A
  97. gifienvlp:      EQU $0B         ;envelope period fine, coarse tune
  98. gicrnvlp:       EQU $0C
  99. giporta:        EQU $0E         ;GI register# for I/O port A
  100. giportb:        EQU $0F         ;Centronics output register
  101.  
  102. ; Bits in "giporta":
  103. xrts:           EQU 8           ;RTS output
  104. dtr:            EQU $10         ;DTR output
  105. strobe:         EQU $20         ;Centronics strobe output
  106. gpo:            EQU $40         ;"general purpose" output
  107.  
  108. ; 68901 ("mfp") sticky chip:
  109. mfp:            EQU $FFFFFA00   ;mfp base
  110. gpip:           EQU mfp+1       ;general purpose I/O
  111. aer:            EQU mfp+3       ;active edge reg
  112. ddr:            EQU mfp+5       ;data direction reg
  113. iera:           EQU mfp+7       ;interrupt enable A & B
  114. ierb:           EQU mfp+9
  115. ipra:           EQU mfp+$0B     ;interrupt pending A & B
  116. iprb:           EQU mfp+$0D
  117. isra:           EQU mfp+$0F     ;interrupt inService A & B
  118. isrb:           EQU mfp+$11
  119. imra:           EQU mfp+$13     ;interrupt mask A & B
  120. imrb:           EQU mfp+$15
  121. vr:             EQU mfp+$17     ;interrupt vector base
  122. tacr:           EQU mfp+$19     ;timer A control
  123. tbcr:           EQU mfp+$1B     ;timer B control
  124. tcdcr:          EQU mfp+$1D     ;timer C & D control
  125. tadr:           EQU mfp+$1F     ;timer A data
  126. tbdr:           EQU mfp+$21     ;timer B data
  127. tcdr:           EQU mfp+$23     ;timer C data
  128. tddr:           EQU mfp+$25     ;timer D data
  129. scr:            EQU mfp+$27     ;sync char
  130. ucr:            EQU mfp+$29     ;USART control reg
  131. rsr:            EQU mfp+$2B     ;receiver status
  132. tsr:            EQU mfp+$2D     ;transmit status
  133. udr:            EQU mfp+$2F     ;USART data
  134.  
  135. ; 6850 registers:
  136. keyctl:         EQU $FFFFFC00   ;keyboard ACIA control
  137. keybd:          EQU $FFFFFC02   ;keyboard data
  138. midictl:        EQU $FFFFFC04   ;MIDI ACIA control
  139. midi:           EQU $FFFFFC06   ;MIDI data
  140.  
  141. ; BIOS Variables
  142. etv_timer:      EQU $0400       ;vector for timer interrupt chain
  143. etv_critic:     EQU $0404       ;vector for critical error chain
  144. etv_term:       EQU $0408       ;vector for process terminate
  145. etv_xtra:       EQU $040C       ;5 reserved vectors
  146. memvalid:       EQU $0420       ;indicates system state on RESET
  147. memcntlr:       EQU $0424       ;mem controller config nibble
  148. resvalid:       EQU $0426       ;validates 'resvector'
  149. resvector:      EQU $042A       ;[RESET] bailout vector
  150. phystop:        EQU $042E       ;physical top of RAM
  151. _membot:        EQU $0432       ;bottom of available memory;
  152. _memtop:        EQU $0436       ;top of available memory;
  153. memval2:        EQU $043A       ;validates 'memcntlr' and 'memconf'
  154. flock:          EQU $043E       ;floppy disk/FIFO lock variable
  155. seekrate:       EQU $0440       ;default floppy seek rate
  156. _timr_ms:       EQU $0442       ;system timer calibration (in ms)
  157. _fverify:       EQU $0444       ;nonzero: verify on floppy write
  158. _bootdev:       EQU $0446       ;default boot device
  159. palmode:        EQU $0448       ;nonzero ==> PAL mode
  160. defshiftmd:     EQU $044A       ;default video rez (first byte)
  161. sshiftmd:       EQU $044C       ;shadow for 'shiftmd' register
  162. _v_bas_ad:      EQU $044E       ;pointer to base of screen memory
  163. vblsem:         EQU $0452       ;semaphore to enforce mutex in vbl
  164. nvbls:          EQU $0454       ;number of deferred vectors
  165. _vblqueue:      EQU $0456       ;pointer to vector of deferred vfuncs
  166. colorptr:       EQU $045A       ;pointer to palette setup (or NULL)
  167. screenpt:       EQU $045E       ;pointer to screen base setup (|NULL)
  168. _vbclock:       EQU $0462       ;count of vblank interrupts
  169. _frclock:       EQU $0466       ;count of unblocked vblanks (not blocked by vblsem)
  170. hdv_init:       EQU $046A       ;hard disk initialization
  171. swv_vec:        EQU $046E       ;video change-resolution bailout
  172. hdv_bpb:        EQU $0472       ;disk "get BPB"
  173. hdv_rw:         EQU $0476       ;disk read/write
  174. hdv_boot:       EQU $047A       ;disk "get boot sector"
  175. hdv_mediach:    EQU $047E       ;disk media change detect
  176. _cmdload:       EQU $0482       ;nonzero: load COMMAND.COM from boot
  177. conterm:        EQU $0484       ;console/vt52 bitSwitches (%%0..%%2)
  178. trp14ret:       EQU $0486       ;saved return addr for _trap14
  179. criticret:      EQU $048A       ;saved return addr for _critic
  180. themd:          EQU $048E       ;memory descriptor (MD)
  181. _____md:        EQU $049E       ;(more MD)
  182. savptr:         EQU $04A2       ;pointer to register save area
  183. _nflops:        EQU $04A6       ;number of disks attached (0, 1+)
  184. constate:       EQU $04A8       ;state of conout() parser
  185. save_row:       EQU $04AC       ;saved row# for cursor X-Y addressing
  186. sav_context:    EQU $04AE       ;pointer to saved processor context
  187. _bufl:          EQU $04B2       ;two buffer-list headers
  188. _hz_200:        EQU $04BA       ;200hz raw system timer tick
  189. _drvbits:       EQU $04C2       ;bit vector of "live" block devices
  190. _dskbufp:       EQU $04C6       ;pointer to common disk buffer
  191. _autopath:      EQU $04CA       ;pointer to autoexec path (or NULL)
  192. _vbl_list:      EQU $04CE       ;initial _vblqueue (to $4ee)
  193. _prt_cnt:       EQU $04EE       ;screen-dump flag (non-zero abort screen dump)
  194. _prtabt:        EQU $04F0       ;printer abort flag
  195. _sysbase:       EQU $04F2       ;-> base of OS
  196. _shell_p:       EQU $04F6       ;-> global shell info
  197. end_os:         EQU $04FA       ;-> end of OS memory usage
  198. exec_os:        EQU $04FE       ;-> address of shell to exec on startup
  199. scr_dump:       EQU $0502       ;-> screen dump code
  200. prv_lsto:       EQU $0506       ;-> _lstostat()
  201. prv_lst:        EQU $050A       ;-> _lstout()
  202. prv_auxo:       EQU $050E       ;-> _auxostat()
  203. prv_aux:        EQU $0512       ;-> _auxout()
  204.